class ResponseData {
  String? code;
  String? msg;
  dynamic data;
  late bool isok;

  bool get success => code != null || data != null;

  ResponseData.fromJson(Map<String, dynamic> json) {
    if (json['code'] != null && json['code'] is String) {
      json['code'] = json['code'];
    }
    code = (json['code'] ?? "").toString();
    msg = json['msg'] ?? json['msg'];
    data = json['data'] ?? json["data"];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = <String, dynamic>{};
    data['code'] = this.code;
    data['msg'] = this.msg;
    data['isok'] = this.isok;
    data['data'] = this.data;
    return data;
  }

  @override
  String toString() {
    return """ResponseData :
    {
    code:$code ,
    msg:$msg ,
    isok:$isok ,
    data:$data ,
    } """;
  }
}
